home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_plotutils.idb / usr / freeware / include / plot.h.z / plot.h
C/C++ Source or Header  |  2002-01-08  |  23KB  |  501 lines

  1. /* This is "plot.h", the public header file for GNU libplot, a shared
  2.    library for 2-dimensional vector graphics.  It declares both the new C
  3.    binding, which is thread-safe, and the old C binding, which is not. */
  4.  
  5. /* stdio.h must be included before this file is included. */
  6.  
  7. /* This header file is written for ANSI C compilers.  If you use it with a
  8.    pre-ANSI C compiler that does not support the `const' keyword, such as
  9.    the `cc' compiler supplied with SunOS (i.e., Solaris 1.x), you should
  10.    use the -DNO_CONST_SUPPORT option when compiling your code. */
  11.  
  12. #ifndef _PLOT_H_
  13. #define _PLOT_H_ 1
  14.  
  15. /***********************************************************************/
  16.  
  17. /* Version of GNU libplot/libplotter which this header file accompanies.
  18.    This information is included beginning with version 4.0.
  19.  
  20.    The PL_LIBPLOT_VER_STRING macro is compiled into the library, as
  21.    `pl_libplot_ver'.  The PL_LIBPLOT_VER macro is not compiled into it.
  22.    Both are available to applications that include this header file. */
  23.  
  24. #define PL_LIBPLOT_VER_STRING "4.1"
  25. #define PL_LIBPLOT_VER         401
  26.  
  27. extern const char pl_libplot_ver[8];   /* need room for 99.99aa */
  28.  
  29. /***********************************************************************/
  30.  
  31. /* The functions in the new C binding deal with `plPlotter' and
  32.    `plPlotterParams' objects.  They are the same as the `Plotter' and
  33.    `PlotterParams' objects of the C++ binding.  Internally, they are called
  34.    `plPlotterStruct' and `plPlotterParamsStruct'. */
  35. typedef struct plPlotterStruct plPlotter;
  36. typedef struct plPlotterParamsStruct plPlotterParams;
  37.  
  38. /* support C++ */
  39. #ifdef ___BEGIN_DECLS
  40. #undef ___BEGIN_DECLS
  41. #endif
  42. #ifdef ___END_DECLS
  43. #undef ___END_DECLS
  44. #endif
  45. #ifdef __cplusplus
  46. # define ___BEGIN_DECLS extern "C" {
  47. # define ___END_DECLS }
  48. #else
  49. # define ___BEGIN_DECLS        /* empty */
  50. # define ___END_DECLS        /* empty */
  51. #endif
  52.      
  53. /* ___P is a macro used to wrap function prototypes, so that compilers that
  54.    don't understand ANSI C prototypes still work, and ANSI C compilers can
  55.    issue warnings about type mismatches. */
  56. #ifdef ___P
  57. #undef ___P
  58. #endif
  59. #if defined (__STDC__) || defined (_AIX) \
  60.     || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
  61.     || defined(WIN32) || defined(__cplusplus)
  62. #define ___P(protos) protos
  63. #else
  64. #define ___P(protos) ()
  65. #endif
  66.  
  67. /* For old compilers (e.g. SunOS) */
  68. #ifdef ___const
  69. #undef ___const
  70. #endif
  71. #ifdef NO_CONST_SUPPORT
  72. #define ___const
  73. #else
  74. #define ___const const
  75. #endif
  76.  
  77. ___BEGIN_DECLS
  78.  
  79. /* THE NEW (thread-safe) C API */
  80.  
  81. /* Constructor/destructor for the plPlotter type.  Parameter values are
  82.    specified at creation time via a plPlotterParams instance.  There is no
  83.    copy constructor. */
  84. plPlotter * pl_newpl_r ___P((___const char *type, FILE *infile, FILE *outfile, FILE *errfile, const plPlotterParams *plotter_params));
  85. int pl_deletepl_r ___P((plPlotter *plotter));
  86.  
  87. /* Constructor/destructor/copy constructor for the plPlotterParams type,
  88.    any instance of which stores parameters that are used when creating a
  89.    plPlotter. */
  90. plPlotterParams * pl_newplparams ___P((void));
  91. int pl_deleteplparams ___P((plPlotterParams *plotter_params));
  92. plPlotterParams * pl_copyplparams ___P((const plPlotterParams *plotter_params));
  93.  
  94. /* A function for setting a single Plotter parameter in a plPlotterParams
  95.    instance.  */
  96. #ifdef NO_VOID_SUPPORT
  97. int pl_setplparam ___P((plPlotterParams *plotter_params, const char *parameter, char *value));
  98. #else
  99. int pl_setplparam ___P((plPlotterParams *plotter_params, const char *parameter, void *value));
  100. #endif
  101.  
  102. /* THE PLOTTER METHODS */
  103.  
  104. /* 13 functions in traditional (pre-GNU) libplot */
  105. int pl_arc_r ___P((plPlotter *plotter, int xc, int yc, int x0, int y0, int x1, int y1));
  106. int pl_box_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1));
  107. int pl_circle_r ___P((plPlotter *plotter, int x, int y, int r));
  108. int pl_closepl_r ___P((plPlotter *plotter));
  109. int pl_cont_r ___P((plPlotter *plotter, int x, int y));
  110. int pl_erase_r ___P((plPlotter *plotter));
  111. int pl_label_r ___P((plPlotter *plotter, ___const char *s));
  112. int pl_line_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1));
  113. int pl_linemod_r ___P((plPlotter *plotter, ___const char *s));
  114. int pl_move_r ___P((plPlotter *plotter, int x, int y));
  115. int pl_openpl_r ___P((plPlotter *plotter));
  116. int pl_point_r ___P((plPlotter *plotter, int x, int y));
  117. int pl_space_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1));
  118.  
  119. /* 46 additional functions in GNU libplot, plus 1 obsolete function
  120.    [pl_outfile_r]. */
  121. FILE* pl_outfile_r ___P((plPlotter *plotter, FILE* outfile));/* OBSOLETE */
  122. int pl_alabel_r ___P((plPlotter *plotter, int x_justify, int y_justify, ___const char *s));
  123. int pl_arcrel_r ___P((plPlotter *plotter, int dxc, int dyc, int dx0, int dy0, int dx1, int dy1));
  124. int pl_bezier2_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2));
  125. int pl_bezier2rel_r ___P((plPlotter *plotter, int dx0, int dy0, int dx1, int dy1, int dx2, int dy2));
  126. int pl_bezier3_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3));
  127. int pl_bezier3rel_r ___P((plPlotter *plotter, int dx0, int dy0, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3));
  128. int pl_bgcolor_r ___P((plPlotter *plotter, int red, int green, int blue));
  129. int pl_bgcolorname_r ___P((plPlotter *plotter, ___const char *name));
  130. int pl_boxrel_r ___P((plPlotter *plotter, int dx0, int dy0, int dx1, int dy1));
  131. int pl_capmod_r ___P((plPlotter *plotter, ___const char *s));
  132. int pl_circlerel_r ___P((plPlotter *plotter, int dx, int dy, int r));
  133. int pl_closepath_r ___P((plPlotter *plotter));
  134. int pl_color_r ___P((plPlotter *plotter, int red, int green, int blue));
  135. int pl_colorname_r ___P((plPlotter *plotter, ___const char *name));
  136. int pl_contrel_r ___P((plPlotter *plotter, int x, int y));
  137. int pl_ellarc_r ___P((plPlotter *plotter, int xc, int yc, int x0, int y0, int x1, int y1));
  138. int pl_ellarcrel_r ___P((plPlotter *plotter, int dxc, int dyc, int dx0, int dy0, int dx1, int dy1));
  139. int pl_ellipse_r ___P((plPlotter *plotter, int x, int y, int rx, int ry, int angle));
  140. int pl_ellipserel_r ___P((plPlotter *plotter, int dx, int dy, int rx, int ry, int angle));
  141. int pl_endpath_r ___P((plPlotter *plotter));
  142. int pl_endsubpath_r ___P((plPlotter *plotter));
  143. int pl_fillcolor_r ___P((plPlotter *plotter, int red, int green, int blue));
  144. int pl_fillcolorname_r ___P((plPlotter *plotter, ___const char *name));
  145. int pl_fillmod_r ___P((plPlotter *plotter, ___const char *s));
  146. int pl_filltype_r ___P((plPlotter *plotter, int level));
  147. int pl_flushpl_r ___P((plPlotter *plotter));
  148. int pl_fontname_r ___P((plPlotter *plotter, ___const char *s));
  149. int pl_fontsize_r ___P((plPlotter *plotter, int size));
  150. int pl_havecap_r ___P((plPlotter *plotter, ___const char *s));
  151. int pl_joinmod_r ___P((plPlotter *plotter, ___const char *s));
  152. int pl_labelwidth_r ___P((plPlotter *plotter, ___const char *s));
  153. int pl_linedash_r ___P((plPlotter *plotter, int n, const int *dashes, int offset));
  154. int pl_linerel_r ___P((plPlotter *plotter, int dx0, int dy0, int dx1, int dy1));
  155. int pl_linewidth_r ___P((plPlotter *plotter, int size));
  156. int pl_marker_r ___P((plPlotter *plotter, int x, int y, int type, int size));
  157. int pl_markerrel_r ___P((plPlotter *plotter, int dx, int dy, int type, int size));
  158. int pl_moverel_r ___P((plPlotter *plotter, int x, int y));
  159. int pl_orientation_r ___P((plPlotter *plotter, int direction));
  160. int pl_pencolor_r ___P((plPlotter *plotter, int red, int green, int blue));
  161. int pl_pencolorname_r ___P((plPlotter *plotter, ___const char *name));
  162. int pl_pentype_r ___P((plPlotter *plotter, int level));
  163. int pl_pointrel_r ___P((plPlotter *plotter, int dx, int dy));
  164. int pl_restorestate_r ___P((plPlotter *plotter));
  165. int pl_savestate_r ___P((plPlotter *plotter));
  166. int pl_space2_r ___P((plPlotter *plotter, int x0, int y0, int x1, int y1, int x2, int y2));
  167. int pl_textangle_r ___P((plPlotter *plotter, int angle));
  168.  
  169. /* 32 floating point counterparts to some of the above (all GNU additions) */
  170. double pl_ffontname_r ___P((plPlotter *plotter, ___const char *s));
  171. double pl_ffontsize_r ___P((plPlotter *plotter, double size));
  172. double pl_flabelwidth_r ___P((plPlotter *plotter, ___const char *s));
  173. double pl_ftextangle_r ___P((plPlotter *plotter, double angle));
  174. int pl_farc_r ___P((plPlotter *plotter, double xc, double yc, double x0, double y0, double x1, double y1));
  175. int pl_farcrel_r ___P((plPlotter *plotter, double dxc, double dyc, double dx0, double dy0, double dx1, double dy1));
  176. int pl_fbezier2_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2));
  177. int pl_fbezier2rel_r ___P((plPlotter *plotter, double dx0, double dy0, double dx1, double dy1, double dx2, double dy2));
  178. int pl_fbezier3_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3));
  179. int pl_fbezier3rel_r ___P((plPlotter *plotter, double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3));
  180. int pl_fbox_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1));
  181. int pl_fboxrel_r ___P((plPlotter *plotter, double dx0, double dy0, double dx1, double dy1));
  182. int pl_fcircle_r ___P((plPlotter *plotter, double x, double y, double r));
  183. int pl_fcirclerel_r ___P((plPlotter *plotter, double dx, double dy, double r));
  184. int pl_fcont_r ___P((plPlotter *plotter, double x, double y));
  185. int pl_fcontrel_r ___P((plPlotter *plotter, double dx, double dy));
  186. int pl_fellarc_r ___P((plPlotter *plotter, double xc, double yc, double x0, double y0, double x1, double y1));
  187. int pl_fellarcrel_r ___P((plPlotter *plotter, double dxc, double dyc, double dx0, double dy0, double dx1, double dy1));
  188. int pl_fellipse_r ___P((plPlotter *plotter, double x, double y, double rx, double ry, double angle));
  189. int pl_fellipserel_r ___P((plPlotter *plotter, double dx, double dy, double rx, double ry, double angle));
  190. int pl_flinedash_r ___P((plPlotter *plotter, int n, const double *dashes, double offset));
  191. int pl_fline_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1));
  192. int pl_flinerel_r ___P((plPlotter *plotter, double dx0, double dy0, double dx1, double dy1));
  193. int pl_flinewidth_r ___P((plPlotter *plotter, double size));
  194. int pl_fmarker_r ___P((plPlotter *plotter, double x, double y, int type, double size));
  195. int pl_fmarkerrel_r ___P((plPlotter *plotter, double dx, double dy, int type, double size));
  196. int pl_fmove_r ___P((plPlotter *plotter, double x, double y));
  197. int pl_fmoverel_r ___P((plPlotter *plotter, double dx, double dy));
  198. int pl_fpoint_r ___P((plPlotter *plotter, double x, double y));
  199. int pl_fpointrel_r ___P((plPlotter *plotter, double dx, double dy));
  200. int pl_fspace_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1));
  201. int pl_fspace2_r ___P((plPlotter *plotter, double x0, double y0, double x1, double y1, double x2, double y2));
  202.  
  203. /* 6 floating point operations with no integer counterpart (GNU additions) */
  204. int pl_fconcat_r ___P((plPlotter *plotter, double m0, double m1, double m2, double m3, double m4, double m5));
  205. int pl_fmiterlimit_r ___P((plPlotter *plotter, double limit));
  206. int pl_frotate_r ___P((plPlotter *plotter, double theta));
  207. int pl_fscale_r ___P((plPlotter *plotter, double x, double y));
  208. int pl_fsetmatrix_r ___P((plPlotter *plotter, double m0, double m1, double m2, double m3, double m4, double m5));
  209. int pl_ftranslate_r ___P((plPlotter *plotter, double x, double y));
  210.  
  211. /* THE OLD (non-thread-safe) C API */
  212.  
  213. /* 3 functions specific to the old C API.  (For construction/destruction
  214.    and selection of Plotters, and setting of Plotter parameters.  The fact
  215.    that a single Plotter is globally `selected' makes the old API
  216.    non-thread-safe.) */
  217. int pl_newpl ___P((___const char *type, FILE *infile, FILE *outfile, FILE *errfile));
  218. int pl_selectpl ___P((int handle));
  219. int pl_deletepl ___P((int handle));
  220.  
  221. /* A function for setting parameters of Plotters that will subsequently be
  222.    created.  This also makes the old API non-thread-safe. */
  223. #ifdef NO_VOID_SUPPORT
  224. int pl_parampl ___P((___const char *parameter, char *value));
  225. #else
  226. int pl_parampl ___P((___const char *parameter, void *value));
  227. #endif
  228.  
  229. /* THE PLOTTER METHODS */
  230. /* In the old API, the Plotter to be acted on is specified by first calling 
  231.    selectpl(). */
  232.  
  233. /* 13 functions in traditional (pre-GNU) libplot */
  234. int pl_arc ___P((int xc, int yc, int x0, int y0, int x1, int y1));
  235. int pl_box ___P((int x0, int y0, int x1, int y1));
  236. int pl_circle ___P((int x, int y, int r));
  237. int pl_closepl ___P((void));
  238. int pl_cont ___P((int x, int y));
  239. int pl_erase ___P((void));
  240. int pl_label ___P((___const char *s));
  241. int pl_line ___P((int x0, int y0, int x1, int y1));
  242. int pl_linemod ___P((___const char *s));
  243. int pl_move ___P((int x, int y));
  244. int pl_openpl ___P((void));
  245. int pl_point ___P((int x, int y));
  246. int pl_space ___P((int x0, int y0, int x1, int y1));
  247.  
  248. /* 46 additional functions in GNU libplot, plus 1 obsolete function
  249.    [pl_outfile]. */
  250. FILE* pl_outfile ___P((FILE* outfile));/* OBSOLETE */
  251. int pl_alabel ___P((int x_justify, int y_justify, ___const char *s));
  252. int pl_arcrel ___P((int dxc, int dyc, int dx0, int dy0, int dx1, int dy1));
  253. int pl_bezier2 ___P((int x0, int y0, int x1, int y1, int x2, int y2));
  254. int pl_bezier2rel ___P((int dx0, int dy0, int dx1, int dy1, int dx2, int dy2));
  255. int pl_bezier3 ___P((int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3));
  256. int pl_bezier3rel ___P((int dx0, int dy0, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3));
  257. int pl_bgcolor ___P((int red, int green, int blue));
  258. int pl_bgcolorname ___P((___const char *name));
  259. int pl_boxrel ___P((int dx0, int dy0, int dx1, int dy1));
  260. int pl_capmod ___P((___const char *s));
  261. int pl_circlerel ___P((int dx, int dy, int r));
  262. int pl_closepath ___P((void));
  263. int pl_color ___P((int red, int green, int blue));
  264. int pl_colorname ___P((___const char *name));
  265. int pl_contrel ___P((int x, int y));
  266. int pl_ellarc ___P((int xc, int yc, int x0, int y0, int x1, int y1));
  267. int pl_ellarcrel ___P((int dxc, int dyc, int dx0, int dy0, int dx1, int dy1));
  268. int pl_ellipse ___P((int x, int y, int rx, int ry, int angle));
  269. int pl_ellipserel ___P((int dx, int dy, int rx, int ry, int angle));
  270. int pl_endpath ___P((void));
  271. int pl_endsubpath ___P((void));
  272. int pl_fillcolor ___P((int red, int green, int blue));
  273. int pl_fillcolorname ___P((___const char *name));
  274. int pl_fillmod ___P((___const char *s));
  275. int pl_filltype ___P((int level));
  276. int pl_flushpl ___P((void));
  277. int pl_fontname ___P((___const char *s));
  278. int pl_fontsize ___P((int size));
  279. int pl_havecap ___P((___const char *s));
  280. int pl_joinmod ___P((___const char *s));
  281. int pl_labelwidth ___P((___const char *s));
  282. int pl_linedash ___P((int n, const int *dashes, int offset));
  283. int pl_linerel ___P((int dx0, int dy0, int dx1, int dy1));
  284. int pl_linewidth ___P((int size));
  285. int pl_marker ___P((int x, int y, int type, int size));
  286. int pl_markerrel ___P((int dx, int dy, int type, int size));
  287. int pl_moverel ___P((int x, int y));
  288. int pl_orientation ___P((int direction));
  289. int pl_pencolor ___P((int red, int green, int blue));
  290. int pl_pencolorname ___P((___const char *name));
  291. int pl_pentype ___P((int level));
  292. int pl_pointrel ___P((int dx, int dy));
  293. int pl_restorestate ___P((void));
  294. int pl_savestate ___P((void));
  295. int pl_space2 ___P((int x0, int y0, int x1, int y1, int x2, int y2));
  296. int pl_textangle ___P((int angle));
  297.  
  298. /* 32 floating point counterparts to some of the above (all GNU additions) */
  299. double pl_ffontname ___P((___const char *s));
  300. double pl_ffontsize ___P((double size));
  301. double pl_flabelwidth ___P((___const char *s));
  302. double pl_ftextangle ___P((double angle));
  303. int pl_farc ___P((double xc, double yc, double x0, double y0, double x1, double y1));
  304. int pl_farcrel ___P((double dxc, double dyc, double dx0, double dy0, double dx1, double dy1));
  305. int pl_fbezier2 ___P((double x0, double y0, double x1, double y1, double x2, double y2));
  306. int pl_fbezier2rel ___P((double dx0, double dy0, double dx1, double dy1, double dx2, double dy2));
  307. int pl_fbezier3 ___P((double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3));
  308. int pl_fbezier3rel ___P((double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3));
  309. int pl_fbox ___P((double x0, double y0, double x1, double y1));
  310. int pl_fboxrel ___P((double dx0, double dy0, double dx1, double dy1));
  311. int pl_fcircle ___P((double x, double y, double r));
  312. int pl_fcirclerel ___P((double dx, double dy, double r));
  313. int pl_fcont ___P((double x, double y));
  314. int pl_fcontrel ___P((double dx, double dy));
  315. int pl_fellarc ___P((double xc, double yc, double x0, double y0, double x1, double y1));
  316. int pl_fellarcrel ___P((double dxc, double dyc, double dx0, double dy0, double dx1, double dy1));
  317. int pl_fellipse ___P((double x, double y, double rx, double ry, double angle));
  318. int pl_fellipserel ___P((double dx, double dy, double rx, double ry, double angle));
  319. int pl_flinedash ___P((int n, const double *dashes, double offset));
  320. int pl_fline ___P((double x0, double y0, double x1, double y1));
  321. int pl_flinerel ___P((double dx0, double dy0, double dx1, double dy1));
  322. int pl_flinewidth ___P((double size));
  323. int pl_fmarker ___P((double x, double y, int type, double size));
  324. int pl_fmarkerrel ___P((double dx, double dy, int type, double size));
  325. int pl_fmove ___P((double x, double y));
  326. int pl_fmoverel ___P((double dx, double dy));
  327. int pl_fpoint ___P((double x, double y));
  328. int pl_fpointrel ___P((double dx, double dy));
  329. int pl_fspace ___P((double x0, double y0, double x1, double y1));
  330. int pl_fspace2 ___P((double x0, double y0, double x1, double y1, double x2, double y2));
  331.  
  332. /* 6 floating point operations with no integer counterpart (GNU additions) */
  333. int pl_fconcat ___P((double m0, double m1, double m2, double m3, double m4, double m5));
  334. int pl_fmiterlimit ___P((double limit));
  335. int pl_frotate ___P((double theta));
  336. int pl_fscale ___P((double x, double y));
  337. int pl_fsetmatrix ___P((double m0, double m1, double m2, double m3, double m4, double m5));
  338. int pl_ftranslate ___P((double x, double y));
  339.  
  340.  
  341. /* UNDOCUMENTED FONT API CALLS */
  342. /* These are used by the graphics programs in the plotutils package (e.g.,
  343.    `graph') to access the font tables within libplot, so that the user can
  344.    be given lists of font names. */
  345.  
  346. #ifdef NO_VOID_SUPPORT
  347. char * pl_get_hershey_font_info ___P((plPlotter *plotter));
  348. char * pl_get_ps_font_info ___P((plPlotter *plotter));
  349. char * pl_get_pcl_font_info ___P((plPlotter *plotter));
  350. char * pl_get_stick_font_info ___P((plPlotter *plotter));
  351. #else
  352. void * pl_get_hershey_font_info ___P((plPlotter *plotter));
  353. void * pl_get_ps_font_info ___P((plPlotter *plotter));
  354. void * pl_get_pcl_font_info ___P((plPlotter *plotter));
  355. void * pl_get_stick_font_info ___P((plPlotter *plotter));
  356. #endif
  357.  
  358. ___END_DECLS
  359.  
  360. /* THE GLOBAL VARIABLES IN GNU LIBPLOT */
  361. /* There are two: user-settable error handlers (not yet documented). */
  362. extern int (*libplot_warning_handler) ___P((___const char *msg));
  363. extern int (*libplot_error_handler) ___P((___const char *msg));
  364.  
  365. #undef ___const
  366. #undef ___P
  367.  
  368.  
  369. /***********************************************************************/
  370.  
  371. /* Useful definitions, included in both plot.h and plotter.h. */
  372.  
  373. #ifndef _PL_LIBPLOT_USEFUL_DEFS
  374. #define _PL_LIBPLOT_USEFUL_DEFS 1
  375.  
  376. /* Symbol types for the marker() function, extending over the range 0..31.
  377.    (1 through 5 are the same as in the GKS [Graphical Kernel System].)
  378.  
  379.    These are now defined as enums rather than ints.  Cast them to ints if
  380.    necessary. */
  381. enum 
  382. { M_NONE, M_DOT, M_PLUS, M_ASTERISK, M_CIRCLE, M_CROSS, 
  383.   M_SQUARE, M_TRIANGLE, M_DIAMOND, M_STAR, M_INVERTED_TRIANGLE, 
  384.   M_STARBURST, M_FANCY_PLUS, M_FANCY_CROSS, M_FANCY_SQUARE, 
  385.   M_FANCY_DIAMOND, M_FILLED_CIRCLE, M_FILLED_SQUARE, M_FILLED_TRIANGLE, 
  386.   M_FILLED_DIAMOND, M_FILLED_INVERTED_TRIANGLE, M_FILLED_FANCY_SQUARE,
  387.   M_FILLED_FANCY_DIAMOND, M_HALF_FILLED_CIRCLE, M_HALF_FILLED_SQUARE,
  388.   M_HALF_FILLED_TRIANGLE, M_HALF_FILLED_DIAMOND,
  389.   M_HALF_FILLED_INVERTED_TRIANGLE, M_HALF_FILLED_FANCY_SQUARE,
  390.   M_HALF_FILLED_FANCY_DIAMOND, M_OCTAGON, M_FILLED_OCTAGON 
  391. };
  392.  
  393. /* ONE-BYTE OPERATION CODES FOR GNU METAFILE FORMAT. These are now defined
  394.    as enums rather than ints.  Cast them to ints if necessary.
  395.  
  396.    There are 85 currently recognized op codes.  The first 10 date back to
  397.    Unix plot(5) format. */
  398.  
  399. enum
  400. {  
  401. /* 10 op codes for primitive graphics operations, as in Unix plot(5) format. */
  402.   O_ARC        =    'a',  
  403.   O_CIRCLE    =    'c',  
  404.   O_CONT    =    'n',
  405.   O_ERASE    =    'e',
  406.   O_LABEL    =    't',
  407.   O_LINEMOD    =    'f',
  408.   O_LINE    =    'l',
  409.   O_MOVE    =    'm',
  410.   O_POINT    =    'p',
  411.   O_SPACE    =    's',
  412.   
  413. /* 42 op codes that are GNU extensions */
  414.   O_ALABEL    =    'T',
  415.   O_ARCREL    =    'A',
  416.   O_BEZIER2    =       'q',
  417.   O_BEZIER2REL    =       'r',
  418.   O_BEZIER3    =       'y',
  419.   O_BEZIER3REL    =       'z',
  420.   O_BGCOLOR    =    '~',
  421.   O_BOX        =    'B',    /* not an op code in Unix plot(5) */
  422.   O_BOXREL    =    'H',
  423.   O_CAPMOD    =    'K',
  424.   O_CIRCLEREL    =    'G',
  425.   O_CLOSEPATH    =    'k',
  426.   O_CLOSEPL    =    'x',    /* not an op code in Unix plot(5) */
  427.   O_COMMENT    =    '#',
  428.   O_CONTREL    =    'N',
  429.   O_ELLARC    =    '?',
  430.   O_ELLARCREL    =    '/',
  431.   O_ELLIPSE    =    '+',
  432.   O_ELLIPSEREL    =    '=',
  433.   O_ENDPATH    =    'E',
  434.   O_ENDSUBPATH    =    ']',
  435.   O_FILLTYPE    =    'L',
  436.   O_FILLCOLOR    =    'D',
  437.   O_FILLMOD    =    'g',
  438.   O_FONTNAME    =    'F',
  439.   O_FONTSIZE    =    'S',
  440.   O_JOINMOD    =    'J',
  441.   O_LINEDASH    =     'd',
  442.   O_LINEREL    =    'I',
  443.   O_LINEWIDTH    =    'W',
  444.   O_MARKER    =    'Y',
  445.   O_MARKERREL    =    'Z',
  446.   O_MOVEREL    =    'M',
  447.   O_OPENPL    =    'o',    /* not an op code in Unix plot(5) */
  448.   O_ORIENTATION    =    'b',
  449.   O_PENCOLOR    =    '-',
  450.   O_PENTYPE    =    'h',
  451.   O_POINTREL    =    'P',
  452.   O_RESTORESTATE=    'O',
  453.   O_SAVESTATE    =    'U',
  454.   O_SPACE2    =    ':',
  455.   O_TEXTANGLE    =    'R',
  456.  
  457. /* 30 floating point counterparts to many of the above.  They are not even
  458.    slightly mnemonic. */
  459.   O_FARC    =    '1',
  460.   O_FARCREL    =    '2',
  461.   O_FBEZIER2    =       '`',
  462.   O_FBEZIER2REL    =       '\'',
  463.   O_FBEZIER3    =       ',',
  464.   O_FBEZIER3REL    =       '.',
  465.   O_FBOX    =    '3',
  466.   O_FBOXREL    =    '4',
  467.   O_FCIRCLE    =    '5',
  468.   O_FCIRCLEREL    =    '6',
  469.   O_FCONT    =    ')',
  470.   O_FCONTREL    =    '_',
  471.   O_FELLARC    =    '}',
  472.   O_FELLARCREL    =    '|',
  473.   O_FELLIPSE    =    '{',
  474.   O_FELLIPSEREL    =    '[',
  475.   O_FFONTSIZE    =    '7',
  476.   O_FLINE    =    '8',
  477.   O_FLINEDASH    =     'w',
  478.   O_FLINEREL    =    '9',
  479.   O_FLINEWIDTH    =    '0',
  480.   O_FMARKER    =    '!',
  481.   O_FMARKERREL    =    '@',
  482.   O_FMOVE    =    '$',
  483.   O_FMOVEREL    =    '%',
  484.   O_FPOINT    =    '^',
  485.   O_FPOINTREL    =    '&',
  486.   O_FSPACE    =    '*',
  487.   O_FSPACE2    =    ';',
  488.   O_FTEXTANGLE    =    '(',
  489.  
  490. /* 3 op codes for floating point operations with no integer counterpart */
  491.   O_FCONCAT        =    '\\',
  492.   O_FMITERLIMIT        =    'i',
  493.   O_FSETMATRIX        =    'j'
  494. };
  495.  
  496. #endif /* not _PL_LIBPLOT_USEFUL_DEFS */
  497.  
  498. /***********************************************************************/
  499.  
  500. #endif /* not _PLOT_H_ */
  501.